package com.hai;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        TextView tv = (TextView) findViewById(R.id.tv);
        tv.setText(helloFromFFmpeg());
    }

    public void clk(View v) {
        if (v.getId() == R.id.btn_live) {
            Intent intent = new Intent(this, LiveActivity.class);
            startActivity(intent);
        }
    }

    public native String helloFromFFmpeg();

    static {
//        System.load("live_jni");
        System.loadLibrary("live_jni");
    }
}
